<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<link href="css/pagination.css" rel="stylesheet" type="text/css" />
<title>推广统计</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 商城中心 <span class="c-gray en">&gt;</span> 推广统计

		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height:1.6em;margin-top:3px" onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>

	</nav>
	
	<div class="pd-20">
		<div class="cl pd-5 bg-1 bk-gray"> 
		<form action="<%=path%>/backstage/t_promote_app_list"  method="post" class="form form-horizontal" id="form-t_promote_app_list">
			<div class="text-c"> 
				<div class="row cl">
					<label class="form-label col-1">城市：</label>
					<div class="formControls col-2">
					<span class="select-box">
					<select name="city_id" class="select">
						<option value="">默认</option>
						<c:forEach items="${citys}" var="city">
						<option value="${city.id}" <c:if test="${city.id==conditions.city_id}">selected</c:if>>${city.name}</option>
						</c:forEach>
					</select>
					</span>
					</div>
					
					<label class="form-label col-1">推广人姓名：</label>
					<div class="formControls col-2">
						<input type="text" value="${conditions.name}" name="name" id="name" class="input-text">
					</div>
					
					<label class="form-label col-1">邀请码：</label>
					<div class="formControls col-2">
						<input type="text" value="${conditions.invite_code}" name="invite_code" id="invite_code" class="input-text">
					</div>
					
					
				</div>
				
				<div class="row cl">
					<label class="form-label col-1">开始时间：</label>
					<div class="formControls col-2">
						<input type="text" id="start_time" name="start_time"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})"  value="${conditions.start_time}"  id="datemin" class="input-text Wdate" style="width:180px;">
					</div>
					<label class="form-label col-1">结束时间：</label>
					<div class="formControls col-2">
						<input type="text" id="end_time" name="end_time" value="${conditions.end_time}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}'})" id="datemax" class="input-text Wdate" style="width:180px;">
					</div>
				
					<div class="formControls col-3">
						<button name="" id="" class="btn btn-success f-r radius mr-20" type="submit"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
					</div>
				
				</div>
			</div>
		</form>
		 </div> 

		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
                        <th width="10%">编号</th>
                        <th width="20%">推广人姓名</th>
						<th width="20%">邀请码</th>
                        <th width="20%">邀请人数</th>
                        <th width="30%">操作</th>
					</tr>
				</thead>
				<tbody>
						<c:forEach items="${list}" var="tga">
						
						<tr class="text-c">
                            <td>${tga.id}</td> 
                            <td>${tga.name}</td>
							<td>${tga.invite_code}</td>
							<td>${tga.count}</td>
							<td class="td-manage">
								<a style="text-decoration:none"
								onClick="t_promote_app_detail(this,'${tga.id}')" href="javascript:void(0);"
								title="详情">详情</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div id="Pagination" class="page-con"></div>
		</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript">
		$(function() {
			initPager();
		});
		
		var showCount = ${pageInfo.showCount};
		var currentPage = ${pageInfo.currentPage-1};
		var totalResult = ${pageInfo.totalResult};
		function initPager(){
			$("#Pagination").pagination(totalResult, {
                callback: function(new_page_index, pagination_container){
                	var oldLocation = location.href;
                	var pa = "currentPage=" + (new_page_index+1);
            		var shoC = "showCount=" + showCount;
                	var index = oldLocation.lastIndexOf("?");
                	if (index == -1){
                		location.href = oldLocation + "?" + pa + "&" + shoC;
                	}else if (oldLocation.indexOf("currentPage") == -1){
                		location.href = oldLocation + "&" + pa;
                	}else if (oldLocation.indexOf("showCount") == -1){
                		location.href = oldLocation + "&" + shoC;
                	}else{
                		var temp = oldLocation.replace(/currentPage=\d+/, pa);
						var newLocation = temp.replace(/showCount=\d+/, shoC);
                		location.href = newLocation;
                	}
                	return false;
                },
                items_per_page:showCount, 
                load_first_page:false,
                prev_text:'上一页',
                next_text:'下一页',
                ellipse_text:'...',
                num_edge_entries:1,
                num_display_entries:5,
                current_page:currentPage
            });
		}
		
		function t_promote_app_detail(obj,id){
			
			var str = "&start_time="+$('#start_time').val()+"&end_time="+$('#end_time').val();
			var edit_page = "<%=path%>/backstage/t_promote_app_detail_list?id="+id+str;
			/* var index = layer.open({
				type: 2,
				title: "详情",
				content: edit_page
			});
			layer.full(index); */
			
			layer_show("详情",edit_page);
		}
	</script>
</body>
</html>



